package com.ymttest.utils.compare;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class RunManager {
	public static void runCompareTask(Class<?> mainCompare){
		
		Method[] methods = mainCompare.getDeclaredMethods();
		for (int i=0;i<methods.length;i++){
			if (methods[i].getAnnotation(StartCompare.class)!=null&&methods[i].getAnnotation(StartCompare.class).isrun()){
				try {
					methods[i].invoke(null, null);
				} catch (IllegalAccessException e) {
					e.printStackTrace();
				} catch (IllegalArgumentException e) {
					e.printStackTrace();
				} catch (InvocationTargetException e) {
					e.printStackTrace();
				}
			}
		}
		
		
		
		
	
	}
}
